//
//  PublicityListCell.m
//  EnvironmentalProtection
//
//  Created by HCreater on 2018/11/26.
//  Copyright © 2018年 HCreater. All rights reserved.
//

#import "PublicityListCell.h"

@interface PublicityListCell()

/// viewModle
@property (nonatomic, readwrite, strong) PublicityListCellModel *viewModel;

/// IBOutlet
@property (weak, nonatomic) IBOutlet UILabel* contentLabel;
@property (weak, nonatomic) IBOutlet UILabel* timeLabel;
@property (weak, nonatomic) IBOutlet UILabel* addrLabel;
@property (weak, nonatomic) IBOutlet UIButton* moreBtn;

@end

@implementation PublicityListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

#pragma mark - bind data
- (void)bindViewModel:(PublicityListCellModel *)viewModel
{
    self.viewModel = viewModel;
    
    self.contentLabel.text = self.viewModel.content;
    self.addrLabel.text = self.viewModel.addr;
    self.timeLabel.text = self.viewModel.time;
    
    self.moreBtn.rac_command = self.viewModel.moreCmd;
}

@end
